{% extends 'base.html' %}

{% block ref %}
<link rel="stylesheet" charset="utf-8" href="/admin/style/publisher.css">
<script>
function submit()
{
    document.forms[0].submit();
}
function cancel()
{
    window.location = "http://{{ host }}/admin/";
}
</script>
{% endblock %}

{% block content %}
<div id="content">
    <div class="pb-main-top clearfix">
        <div class="l">&nbsp;</div>
        <div class="r">&nbsp;</div>
    </div>
    <div class="pb-wrapper clearfix">
        <form id="form" method="post">
            <div id="pb-main">
                <h2 id="pb-main-title" class="clearfix">
                    <span>编辑链接</span>
                </h2>
                <div id="pb-post-area">
                    <div id="pb-text-title-holder" class="pb-post-section">
                        <h3 class="pb-section-title">标题<span>(可不填)</span></h3>
                        <input tabindex="1" type="text" name="link-title" class="pb-input-text" id="pb-text-title"
                               value="{{ link.Title }}">
                    </div>
                    <div id="pb-link-url-holder" class="pb-post-section">
                        <h3 class="pb-section-title">链接地址</h3>
                        <input id="pb-link-url-input" name="link-address" class="pb-input-text"
                                value="{{ link.Address }}">
                    </div>
                    <div id="pb-link-desc-holder" class="pb-post-section" style="">
                        <h3 class="pb-section-title">
                            描述
                            <span>(可不填)</span>
                        </h3>
                        <input id="pb-link-desc-input_editor" name="link-description" class="pb-input-text"
                                value="{{ link.Description }}">
                    </div>
                    <div id="pb-link-order-holder" class="pb-post-section">
                        <h3 class="pb-section-title">显示顺序</h3><span>(可不填)</span>
                        <input id="pb-link-order-input" name="link-order" class="pb-input-text"
                               value="{{ link.Order }}">
                    </div>
                </div>
                <div id="pb-action-holder" class="clearfix">
                    <div class="pb-submit">
                        <div onclick="submit()" cloud="" id="ctrlbuttonpb-submit" data-control="pb-submit" class="ui-button skin-button-willblue" style="width: 70px; ">
                            <span class="ui-button-bg-left skin-button-willblue-bg-left"></span>
                            <div id="ctrlbuttonpb-submitlabel" class="ui-button-label skin-button-willblue-label">
                                <span id="ctrlbuttonpb-submittext" class="ui-button-text skin-button-willblue-text">发布</span>
                            </div>
                        </div>
                    </div>
                    <div class="pb-preview">
                        <div cloud="" id="ctrlbuttonpb-preview" data-control="pb-preview" class="ui-button skin-button-willlight" style="width: 70px; ">
                            <span class="ui-button-bg-left skin-button-willlight-bg-left"></span>
                            <div id="ctrlbuttonpb-previewlabel" class="ui-button-label skin-button-willlight-label">
                                <span id="ctrlbuttonpb-previewtext" class="ui-button-text skin-button-willlight-text">预览</span>
                            </div>
                        </div>
                    </div>
                    <div class="pb-cancel">
                        <div onclick="cancel()"  cloud="" id="ctrlbuttonpb-cancel" data-control="pb-cancel" class="ui-button skin-button-willlight" style="width: 70px; ">
                            <span class="ui-button-bg-left skin-button-willlight-bg-left"></span>
                            <div id="ctrlbuttonpb-cancellabel" class="ui-button-label skin-button-willlight-label">
                                <span id="ctrlbuttonpb-canceltext" class="ui-button-text skin-button-willlight-text">取消</span>
                            </div>
                        </div>
                    </div>
                    <span id="pb-submiting-tip" style="display:none;">正在保存...</span>
                </div>
            </div>
            <div id="pb-aside">
                <div class="pb-aside-i">

                </div>
            </div>
        </form>
    </div>
</div>
{% endblock %}